package com.bdqn.hospital.service.impl;

import com.bdqn.hospital.mapper.DrugBatchMapper;
import com.bdqn.hospital.pojo.DrugBatch;
import com.bdqn.hospital.mapper.DrugBatchMapper;
import com.bdqn.hospital.service.DrugBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @version : 1.0
 * @Author :guogd
 * @createTime: 2023/03/01 14:59
 * @Description: com.bdqn.hospital.service.impl
 */
@Service
public class DrugBatchServiceImpl implements DrugBatchService {

    @Autowired
    private DrugBatchMapper drugBatchMapper;

    @Override
    public Integer updateResidueStock(Integer prescriptionCount, Integer prescriptionId) {
        return drugBatchMapper.updateResidueStock(prescriptionCount,prescriptionId);
    }
    @Override
    public DrugBatch getDrug(String name) {
        return drugBatchMapper.getDrug(name);
    }

    @Override
    public Integer isConut(Integer id, Integer count) {
        return drugBatchMapper.isConut(id, count);
    }
}
